<?php

namespace App\Models\Fund;

use App\Models\BaseModel;
/**
 * 资金账户
 *
 * Class IntegralOptionLog
 * @package App\Models\Fund
 */
class IntegralOptionLog extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'integral_option_log';

    /**
     * Indicates if the model should be timestamped.
     * @var bool
     */
    public $timestamps = false;
    public $appends = ['status_text','type_text'];
    public $typeText = ['init'=>'初始化', 'prepaid'=>'系统充值', 'transfer'=>'转账', 'payment'=>'支付', 'borrow'=>'借款', 'refund'=>'还款', 'freeze'=>'冻结', 'unfreeze'=>'解冻','system'=>'系统'];


      public function getTypeTextAttribute()
    {
        return $this->typeText[$this['type']];
    }

      public function getUserInfoAttribute($value)
    {
        return json_decode($value, true);
    }
   
    public function getOppositeInfoAttribute($value)
    {
        return json_decode($value, true);
    }
   
}
